package cn.com.shopec.erp.core.constant;

import cn.com.shopec.erp.core.utils.SpringContextUtil;



public final class Constants {
	/**
	 * servlet basepath,e.g. /SZSCM
	 */
	public static final String BASEPATH = SpringContextUtil.getServletContextPath();
	/**
	 * 查询条件：所有
	 */
	public static final int QUERY_ALL = -1;

	/**
	 * 通用状态标识：否
	 */
	public static final int COMMON_FLAG_NO = 0;

	/**
	 * 通用状态标识：是
	 */
	public static final int COMMON_FLAG_YES = 1;

	/**
	 * 删除标识：未删除
	 */
	public static final int DELETE_FLAG_NO = 1;

	/**
	 * 删除标识：已删除
	 */
	public static final int DELETE_FLAG_YES = 0;

	/**
	 * 字符串拆分标识：','
	 */
	public static final String SPLIT_CHARACTER = ",";

	/**
	 * 字符串拆分标识：'-'
	 */
	public static final String SPLIT_CHARACTER_LINE = "-";

	/**
	 * 成功
	 */
	public static final String SUCCESS = "success";

	/**
	 * 失败
	 */
	public static final String FAIL = "fail";
	
	/**
	 * 删除前检查有下个等级返回的结果
	 */
	public static final String EVALUE = "empiricalValue";

	/**
	 * 被引用
	 */
	public static final String CITED = "cited";

	/**
	 * 商品类别层级
	 */
	public static final String GOODS_CATEGORY_LEVEL1 = "1";
	public static final String GOODS_CATEGORY_LEVEL2 = "2";
	public static final String GOODS_CATEGORY_LEVEL3 = "3";

	/**
	 * 图片规格常量分割标示符
	 * 
	 */
	public static final String PATHSEPARATOR = "/"; // 路径分隔符
	public static final String GOODS_CAT_PATH = "goods_cat_images"; // 图片存放路径
	public static final String GOODS_SPEC_PATH = "goods_spec_images"; // 图片存放路径

	/**
	 * 系统资源根ID
	 */
	public static final String RESOURCE_ROOT_ID = "1";

	/**
	 * 系统资源第二层，页面显示的第一层
	 */
	public static final int RESOURCE_SECOND_LEVEL_ID = 2;

	/**
	 * 审核状态
	 */
	public static final String CHECK_STATE_WAIT = "0";// 审核状态 0：待审核
	public static final String CHECK_STATE_PASS = "1";// 审核状态 1：已审核
	/**
	 * 锁定状态
	 */
	public static final String LOCK_STATE_YES = "0";// 锁定状态 0：已锁定
	public static final String LOCK_STATE_NO = "1";// 锁定状态1：已解锁

	/**
	 * 显示状态
	 */
	public static final String SHOW_STATE_YES = "1";// 显示
	public static final String SHOW_STATE_NO = "0";// 隐藏

	/**
	 * 标签与商品关系
	 */
	public static final String GOODS_TYPE_TAG = "0";// 与标签直接关联
	public static final String GOODS_TYPE_CAT = "1";// 通过分类与标签关联
	public static final String GOODS_TYPE_CAT2 = "2";//分类与标签关联

	/**
	 * 参加活动的商品的状态
	 */
	//public static final int ACTIVITY_GOODS_APPLY = 1;// 1：申请中
	public static final int ACTIVITY_GOODS_PASS = 2;// 2：审核通过,已参与
	//public static final int ACTIVITY_GOODS_REJECT = 3;// 3：审核拒绝；
	public static final int ACTIVITY_GOODS_RECALL = 4;// 4：商品已撤回
	
	//限时抢购活动商品状态,0:已售完;1:未售完
	public static final int GOODS_IS_SOLD_OUT = 0;
	public static final int GOODS_UN_SOLD_OUT = 1;

	/**
	 * 选择物流：0 未选择1：已选择
	 */
	public static final String CHOOSE_1 = "1";

	/**
	 * 验证码图片
	 */
	public static final String LOGIN_VALIDATE_IMAGE = "login_validate_image";
	
	/**
	 * 手机验证码
	 */
	public static final String MCODE = "mcode";


	/**
	 * 前台会员登录用户
	 */
	public static final String LOGIN_MEMBER = "login_member";
	/**
	 * 平台后台登录用户
	 */
	public static final String LOGIN_USER = "login_user";
	/**
	 * 供应商后台登录用户
	 */
	public static final String LOGIN_SUPPLIER_USER = "login_supplier";
	/**
	 * 登录会员id
	 */
	public static final String LOGIN_ID = "login_id";
	
	/**
	 * 已经注册
	 */
	public static final String ALREADY_REGISTER="alerady_register";

	/**
	 * 登录会员手机号码
	 */
	public static final String LOGIN_MOBILEPHONE = "login_mobilephone";

	public static final String LOGIN_URI_PATH_back_idx = BASEPATH+"/manager";
	public static final String LOGIN_URI_PATH_wap_idx = BASEPATH+"/wasu/wap";
	
	/** 后台登录的路径 */
	public static final String LOGIN_URI_PATH_pl_index = BASEPATH+"/manager/system/main/toIndex.do";
	public static final String LOGIN_URI_PATH_pl_login = BASEPATH+"/manager/system/main/login.do";
	public static final String LOGIN_URI_PATH_pl_main = BASEPATH+"/manager/system/main/mainFrame.do";

	// wap
	public static final String LOGIN_URI_PATH_wap_index = BASEPATH+"/wasu/wap/toIndex.do";

	/**
	 * 未登录或session过期
	 */
	public static final String NOT_LOGIN = "notLogin";

	/**
	 * WAP端未登录或session过期
	 */
	public static final String WAP_NOT_LOGIN = "wapNotLogin";

	/**
	 * 无访问权限
	 */
	public static final String NO_PRIVILEGE = "noPrivilege";

	/**
	 * 可访问
	 */
	public static final String ACCESSABLE = "accessable";

	/**
	 * 系统授权资源类型：平台端
	 */
	public static final String AUTHORIZATION_TYPE_PLATFORM = "1";
	/**
	 * 系统授权资源类型：供应商端
	 */
	public static final String AUTHORIZATION_TYPE_SUPPLIERS = "2";
	/**
	 * 系统授权资源类型：WAP端
	 */
	public static final String AUTHORIZATION_TYPE_WAP = "3";
	/**
	 * 系统授权资源类型：平台、供应商端公共类型
	 */
	public static final String AUTHORIZATION_TYPE_COMMON = "4";
	

	/***
	 * 拦截器的key值
	 */
	public static final String key_KeywordsInterceptor_banKeywords = "banKeywords";
	/**
	 * 权限
	 */
	public static final String SYSTEM_PRIVILEGE = "system_privilege";
	public static final String PRIVILEGE_PLATFORM = "PLATFORM";
	public static final String PRIVILEGE_SUPPLI = "SUPPLI";
	public static final String PRIVILEGE_LOGIN = "LOGIN";
}
